#!/bin/bash
INSTALL_PATH=/usr/bin

if [ `id -u` -ne 0 ]
then
    echo "Need to be ROOT to run install."
    exit 1
fi

if [ $# -eq 1 ]
then
    INSTALL_PATH=$1
fi

if [[ -e 'zruijie' && -e 'runruijie' ]]
then
    echo $'\n#### Files intalling to '$INSTALL_PATH$' ####\n'
    install -v -m 4755 -o root zruijie $INSTALL_PATH
    install -v -m 0755 -o root runruijie $INSTALL_PATH
    echo $'\n#### Installation Done. ####\n'
else
    echo $'\n#### Execute files `zruijie\' or `runruijie\' NOT Found. ####\n'
    echo $'     Did you forget `make\'?\n\n'
    exit 1
fi

exit 0

